package com.lf.cloud.comm.dao;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.lf.cloud.comm.modal.pojo.BlogTags;
import com.lf.cloud.comm.webutils.CommMethod;

public class BlogTagsDao extends BlogTags {
	
	public static BlogTagsDao me = new BlogTagsDao();
	public static String tabName = CommMethod.getTbaleName("BlogTags");
	
	
	public void insertBlogTag(BlogTags blogTag){
		blogTag.save();
	}
	public void insertBatchBlogTag(List<BlogTags> blogTags , int batchSize){
		Db.batchSave(blogTags, batchSize);
	}
	
	
	
	public List<BlogTags> geetBlogTagNames(){
		String sql = " select * from "+tabName + " where is_delete='0' ";
		return dao.find(sql);
	}
	
	public BlogTags geetBlogTagByTagNo(String  tagNo){
		String sql = " select * from "+tabName + " where is_delete='0' and tag_no='"+tagNo+"' ";
		return dao.findFirst(sql);
	}
	
	

}
